export function dealArray(arr){
    let map = {},newArr = []
    for(let i = 0; i < arr.length; i++){
        if(!map[arr[i].order_user_id]){
            newArr.push({
                order_user_id: arr[i].order_user_id,
                order_time: arr[i].order_time,
                children: [{
                    order_goods_id:arr[i].order_goods_id,
                    order_num:arr[i].order_num,
                    goods_title:arr[i].goods_title,
                    goods_price:arr[i].goods_price,
                    goods_url:arr[i].goods_url
                }]
            });
            map[arr[i].order_user_id] = arr[i].order_user_id;
        }else{
            for(let j = 0; j < newArr.length; j++){
                if(newArr[j].order_user_id == arr[i].order_user_id){
                newArr[j].children.push({
                    order_goods_id:arr[i].order_goods_id,
                    order_num:arr[i].order_num,
                    goods_title:arr[i].goods_title,
                    goods_price:arr[i].goods_price,
                    goods_url:arr[i].goods_url
                });
                break;
                }
            }
        }
    }
    return newArr
}